numbers = [1, 2, 3, 4]
count = 0

print("所有可能的三位数：")
for a in numbers:
    for b in numbers:
        for c in numbers:
            if a != b and b != c and a != c:
                print(f"{a}{b}{c}", end=" ")
                count += 1

print(f"\n总共有 {count} 个不同的三位数")
